﻿using System.Web.Mvc;

namespace CleverCMS.Web.Cms.Account
{
    public class CleverCmsAccountAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "CleverCms.Account";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {

            //context.MapRoute("account_reset",
            //                "account/passwordreset/resettoken={resettoken}",
            //                new { controller = "account", action = "passwordreset", resettoken = UrlParameter.Optional },
            //                new[] { "CleverCMS.Web.Controllers" });
            
            context.MapRoute("account", 
                             "account/{action}", 
                             new { controller = "account", action = "Edit", id = UrlParameter.Optional }, 
                             new[] { "CleverCMS.Web.Controllers" });

            context.MapRoute("account_default",
                             "account/{controller}/{action}/{id}",
                             new { controller = "account", action = "index", id = UrlParameter.Optional },
                             new[] { "CleverCMS.Web.Controllers" }
            );
           
        }
    }
}
